package com.uwo.house.dao;

import com.uwo.house.beans.request.MaterialDetailReq;
import com.uwo.house.beans.request.MaterialStatusReq;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;


import java.util.List;

/**
 * Created by Administrator on 2017/8/23.
 */
@Repository
public interface MaterialStatusDao {

    /**
     * 供应商端按材料清单状态进行查询
     * @param materialStatus
     * @return
     */
    int searchStatus(@Param("materialStatus") int materialStatus);
    /**
     * 存入清单状态
     */
    int addMaterialStatus(MaterialStatusReq materialStatusReq);

    /**
     * 供应商更新清单状态，供应商发货后更新清单状态
     */
    int updateMaterialStatus(@Param("id") String id);

    /**
     * 供应商删除完成清单
     */
    int deleteMaterialStatus(@Param("id") int id);
    /**
     * 供应商端显示订单和查询
     */
    List<MaterialStatusReq> getMaterialList(@Param("supplierId") String supplierId, @Param("orderId") String orderId,
                                            @Param("materialSts") int materialSts);


    /**
     * 供应商端对其回复信息进行查看
     * @param type
     * @param handleStatus
     * @return
     */
    int searchReplyStatus(@Param("type") int type, @Param("handleStatus") int handleStatus);


    /**
     * 显示订单详情
     * @param planId
     * @return
     */
    List<MaterialDetailReq> getMaterialDetailByPlanId(int planId);

}
